package com.wz.one;

/**
 * @description: Milk、Mocha...（牛奶类、摩卡类...）：相当于ConcreteDecorator
 * @author: WZ
 * @create: 2019-02-14 22:10
 **/

public class Mocha extends CondimentDecorator{

    protected Beverage beverage;

    public Mocha(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription()+",with Mocha";
    }

    @Override
    public double cost() {
        return beverage.cost()+ 1.2;
    }
}
